<div ng-controller="userRoleController">
<div class="modal fade in ip-box" tabindex="-1" role="dialog" data-backdrop="static" aria-labelledby="myModalLabel" aria-hidden="true" id="add">
	<div class="modal-dialog " role="document" >
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
				<h4 class="modal-title" id="myModalLabel">角色管理 — 新增</h4>
			</div>
			<div class="modal-body">
                   
                	<form name="userroleAdd_form" novalidate>
                        <div class="form-group">
                                <label class="col-xs-12 col-sm-3 control-label text-right">角色名称：</label>
                                <div class="col-xs-12 col-sm-9">
                                    <input type="text" 
                                           name="roleName"
                                           class="form-control" 
                                           autocomplete="off"
                                           ng-minlength="2" 
                                           ng-maxlength="20"  
                                           ng-model="role_roleName"
                                           required 
                                    />
                                    <label class="red required">*</label>
                                     <div class="error" ng-show="userroleAdd_form.roleName.$dirty && userroleAdd_form.roleName.$invalid">
    								    <small class="error" ng-show="userroleAdd_form.roleName.$error.required">请输入角色名</small>
    								    <small class="error" ng-show="userroleAdd_form.roleName.$error.minlength ">角色名长度在2-20之间</small>
    								    <small class="error" ng-show="userroleAdd_form.roleName.$error.maxlength">角色名长度在2-20之间</small>
    	 							 </div>
                                </div>       
                        </div>
                  		<div class="form-group height-auto">
                            <label class="col-xs-12 col-sm-3 control-label text-right">角色组：</label>
                            <div class="col-xs-12 col-sm-9">
                                <select ng-model="role_roleGroupName" ng-options="o.id as o.roleGroupName for o in roleGroupList" ng-change="roleGroupSelect()">
                                	<option value="" ng-click="getroleGroupID()">请选择</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group height-auto">
                            <label class="col-xs-12 col-sm-3 control-label text-right">自动分配：</label>
                            <div class="col-xs-12 col-sm-9">
                                <select ng-model="role_autoAssignment" ng-options="o.id as o.name for o in autoAssignmentList">
                                	<option value="">请选择</option>
                                	<option value="0">是</option>
                                	<option value="1">不是</option>
                                </select>
                            </div>
                        </div>
                  		
                        <div class="form-group height-auto">
                            <label class="col-xs-12 col-sm-3 control-label text-right">描述：</label>
                            <div class="col-xs-12 col-sm-9">
                                <textarea rows="5" type="text" name="description" class="form-control" ng-model="role_description"/></textarea>
                            </div>
                        </div>
                        <div class=" height-auto">
                            <label class="col-xs-12 col-sm-3 control-label text-right"></label>
                            <div class="col-xs-12 col-sm-9">
                                <div class="modal-footer">
				                    <button type="button" class="btn btn-primary" ng-disabled="userroleAdd_form.$invalid"  ng-click="confirmNewlyAdded()">新增</button></div>
            					</div>
                            </div>
                        </div>
    					</form>
    					
                </div>
                
            	</div>
        </div>
    </div>
       </div>
	</div>
<!-- 新增 END -->
</div>	
